package com.group.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.DeleteMapping;

import com.group.model.Message;

@Repository
public interface MessageDao {

	public List<Message> queryNewMessage(@Param("userId") Long userId, @Param("state") Integer state, @Param("type") Integer type, @Param("start") Integer start, @Param("limit") Integer limit);

	@Update("update message set state = 1 where userId = #{arg0} and type = #{arg1}")
	public void updateMessage(Long userId, Integer type);

	public int queryNewMessageCount(@Param("userId") Long userId, @Param("state") Integer state, @Param("type") Integer type);

}
